package com.appspot.bibtable.model.format;

import java.text.SimpleDateFormat;
import java.util.Date;

public class YearFormatter extends OutputFormatter
{
	private static final SimpleDateFormat internalFormatter = new SimpleDateFormat("yyyy");

	@Override
	public String format(Object date)
	{
		return format((Date)date);
	}

	public String format(Date date)
	{
		return date == null ? null : internalFormatter.format(date);
	}
}
